﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using GcTicket.BLL.Data;
using GcTicket.Model;

namespace WebApp
{
    public partial class CityList : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindData();
            }
        }

        private void BindData()
        {
            EntityManager<City> manager = new EntityManager<City>();

            var resultList = from c in manager.Entities
                             orderby c.Id ascending
                             select c;
            Repeater1.DataSource = resultList;
            Repeater1.DataBind();
        }
    }
}
